package event;

import bean.Order;
import org.springframework.context.ApplicationEvent;

/**
 * 订单购买成功事件
 */
public class OrderSuccessEvent extends ApplicationEvent {

    private Order order;

    /**
     * Create a new ApplicationEvent.
     *
     * @param source the object on which the event initially occurred (never {@code null})
     */
    public OrderSuccessEvent(Object source) {
        super(source);
    }

    public OrderSuccessEvent(Object source, Order order) {
        super(source);
        this.order = order;
    }

    public Order getOrder() {
        return order;
    }

    public void setOrder(Order order) {
        this.order = order;
    }
}
